package com.baizhi.service2;

import com.baizhi.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class UserService2Impl implements UserService2 {
    @Autowired
    private UserService us;

    @Override
    public Map dj(int[] id) {
        Map map = new HashMap();

        try {
            us.dj(id);
            map.put("mydj",true);
        } catch (Exception e) {
            map.put("mydj",false);
            e.printStackTrace();
        }
        return map;
    }

    @Override
    public Map jd(int[] id) {
        Map map = new HashMap();
        try {
            us.jd(id);
            map.put("myjd",true);
        } catch (Exception e) {
            map.put("myjd",false);
            e.printStackTrace();
        }

        return map;
    }
}
